package com.jh.readme.iu.activity.ndetail;

import com.jh.tools.bean.NeteastNewsDetail;
import com.jh.tools.bean.SinaPhotoList;

import java.util.List;
import java.util.Map;

import rx.Subscriber;

/**
 * Created by niejiahuan on 2016/5/31.
 * 主界面控制层
 */
public class NewsDetailPresenter extends NewsDetailContract.Presenter {
    private NeteastNewsDetail mNeteastNewsDetail;
    @Override
    public void onStart() {

    }

    @Override
    void getNewsDetail(final String newsId) {
        mModel.getNewsDetailDate(newsId).subscribe(new Subscriber<Map<String, NeteastNewsDetail>>() {
            @Override
            public void onCompleted() {

            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onNext(Map<String, NeteastNewsDetail> stringNeteastNewsDetailMap) {
                mNeteastNewsDetail=stringNeteastNewsDetailMap.get(newsId);
            }
        });
    }
}
